import request from '@/utils/request'
import { InfoResponse, PeopleListResponse,EnrollResponse } from '@/types/projectInfo'

// 获取项目详情
export async function getProjectDetail(project_id: number) {
  const response = await request.get<InfoResponse>('/wx/user/getProjectInfo', { params: { project_id } })
  return response.data
}

// 获取报名信息
export async function getEnrollInfo(project_id: number) {
  const response = await request.get<PeopleListResponse>('/wx/user/getPeopleDetail', { params: { project_id } })
  return response.data
}
// 报名接口
export async function enroll(project_id: number) {
  const response = await request.post<EnrollResponse>('/wx/user/apply', { project_id })
  return response.data
}
